package priv.ln.one;

import java.util.Scanner;

/**
 * ClassName: exer1
 * Package: priv.ln.one
 * Description:
 * 用一个数组，保存星期一到星期天的7个英语单词，从键盘输入1-7，显示对应的单词
 *
 * @Author 辣辣
 * @Create 2024/6/12 16:47
 * @Version 1.0
 */
public class exer1 {
    public static void main(String[] args) {
        String[] weekEnglish = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
        Scanner scanner = new Scanner(System.in);
        boolean isFlag = true;

        while (isFlag) {
            System.out.print("请输入数字1-7,输入0结束：");
            int number = scanner.nextInt();

            if (number >= 1 && number <= 7) {
                System.out.println(weekEnglish[number - 1]);
            }
            if (number == 0) {
                isFlag = false;
            }
        }

        scanner.close();
    }

}